home *** CD-ROM | disk | FTP | other *** search
Wrap
on startMovie sound stop 2 cursor([402, 403]) set the cursor of sprite 46 to [404, 405] set the cursor of sprite 45 to [404, 405] set the cursor of sprite 13 to [404, 405] end on init Set_SMLastSp(EMPTY) Set_SMChosenSubMenu(Get_SelectedLine()) Set_SMMaxLines(10) Set_SMSourceField(field ("LIST" & Get_SMChosenSubMenu() & "-" & Get_ScreenSubject())) Set_SMFieldScroll(the number of cast "currScroll") Set_SMNumOflines(the number of lines in Get_SMSourceField()) set the textHeight of field Get_SMFieldScroll() to 14 Set_SMSliderSprite(5) Set_SMThumbSprite(6) Set_SMCurrPlace(0) Set_SMConstraintSprite(9) Set_SMDisableSprite(13) Set_SMHiliteSprite(15) Set_SMSizeOfLine(14) Set_SMTopField(the top of sprite 10) Set_SMSelectedLine(EMPTY) puppetSprite(Get_SMHiliteSprite(), 1) puppetSprite(Get_SMThumbSprite(), 1) set the immediate of sprite Get_SMThumbSprite() to 1 Set_SMSliderHeight(the height of sprite Get_SMConstraintSprite()) Set_SMOptions(Get_SMNumOfLines() - Get_SMMaxLines()) set the visible of sprite Get_SMDisableSprite() to not (Get_SMOptions() > 0) if Get_SMOptions() > 0 then Set_SMIncrement(1.0 * Get_SMSliderHeight() / Get_SMOptions()) set the cursor of sprite 13 to [404, 405] else set the cursor of sprite 13 to [400, 401] end if Set_SMTopLoc(the top of sprite Get_SMConstraintSprite()) repeat with i = 20 to 39 puppetSprite(i, 1) end repeat end on CancelLastSp if Get_SMLastSP() <> EMPTY then set the puppet of sprite Get_SMLastSP() to 0 updateStage() end if end on ChooseLine set TopLoc to Get_SMTopField() set VerticalLoc to getAt(the clickLoc, 2) set NumOfline to (VerticalLoc - TopLoc) / Get_SMSizeOfLine() if (NumOfline + 1) <= Get_SMNumOfLines() then set newLoc to (NumOfline * Get_SMSizeOfLine()) + TopLoc set the locV of sprite Get_SMHiliteSprite() to newLoc Set_SMSelectedLine(Get_SMCurrPlace() + NumOfline + 1) end if end on UpdateHilight if (Get_SMSelectedLine() <> EMPTY) and (Get_SMSelectedLine() > Get_SMCurrPlace()) and ((Get_SMSelectedLine() - 1) < (Get_SMCurrPlace() + Get_SMMaxLines())) then set TopLoc to Get_SMTopField() set newLoc to ((Get_SMSelectedLine() - Get_SMCurrPlace() - 1) * Get_SMSizeOfLine()) + TopLoc set the locV of sprite Get_SMHiliteSprite() to newLoc else set the locV of sprite Get_SMHiliteSprite() to 999 end if updateStage() end on SliderActive repeat while the stillDown if rollOver(11) then set newV to constrainV(Get_SMConstraintSprite(), mouseV()) set the locV of sprite Get_SMThumbSprite() to newV set newValue to integer((newV - Get_SMTopLoc()) / Get_SMIncrement()) Set_SMCurrPlace(newValue) UpdateHilight() put line Get_SMCurrPlace() + 1 to Get_SMCurrPlace() + Get_SMMaxLines() of Get_SMSourceField() into field Get_SMFieldScroll() end if end repeat end on PlaceMySlider set currentValue to Get_SMCurrPlace() if Get_SMOptions() > 0 then set newPlace to Get_SMTopLoc() + integer(Get_SMIncrement() * currentValue) end if UpdateHilight() put line Get_SMCurrPlace() + 1 to Get_SMCurrPlace() + Get_SMMaxLines() of Get_SMSourceField() into field Get_SMFieldScroll() end on PlaceSlider set currentValue to Get_SMCurrPlace() if Get_SMOptions() > 0 then set newPlace to Get_SMTopLoc() + integer(Get_SMIncrement() * currentValue) set the locV of sprite Get_SMThumbSprite() to constrainV(Get_SMConstraintSprite(), newPlace) updateStage() end if UpdateHilight() put line Get_SMCurrPlace() + 1 to Get_SMCurrPlace() + Get_SMMaxLines() of Get_SMSourceField() into field Get_SMFieldScroll() end on ClickSlider toSub if not toSub then Set_SMCurrPlace(Get_SMCurrPlace() - Get_SMMaxLines() + 1) else Set_SMCurrPlace(Get_SMCurrPlace() + Get_SMMaxLines() - 1) end if if Get_SMCurrPlace() < 0 then Set_SMCurrPlace(0) else if (Get_SMCurrPlace() + Get_SMMaxLines()) > Get_SMNumOfLines() then Set_SMCurrPlace(Get_SMNumOfLines() - Get_SMMaxLines()) end if end if PlaceSlider() end on Set_SMStepMeter direction set currentValue to Get_SMCurrPlace() if (direction = "increase") and (currentValue <> Get_SMOptions()) then Set_SMCurrPlace(currentValue + 1) else if (direction = "decrease") and (currentValue <> 0) then Set_SMCurrPlace(currentValue - 1) end if end if PlaceSlider() end on Set_SMSliderSprite int global SMSliderSprite set SMSliderSprite to int end on Get_SMSliderSprite global SMSliderSprite return SMSliderSprite end on Set_SMThumbSprite int global SMThumbSprite set SMThumbSprite to int end on Get_SMThumbSprite global SMThumbSprite return SMThumbSprite end on Set_SMCurrPlace int global SMCurrPlace set SMCurrPlace to int end on Get_SMCurrPlace global SMCurrPlace return SMCurrPlace end on Set_SMSliderHeight int global SMSliderHeight set SMSliderHeight to int end on Get_SMSliderHeight global SMSliderHeight return SMSliderHeight end on Set_SMIncrement int global SMIncrement set SMIncrement to int end on Get_SMIncrement global SMIncrement return SMIncrement end on Set_SMTopLoc int global SMTopLoc set SMTopLoc to int end on Get_SMTopLoc global SMTopLoc return SMTopLoc end on Set_SMOptions int global SMOptions set SMOptions to int end on Get_SMOptions global SMOptions return SMOptions end on Set_SMMaxLines int global SMMaxLines set SMMaxLines to int end on Get_SMMaxLines global SMMaxLines return SMMaxLines end on Set_SMSourceField str global SMSourceField set SMSourceField to str end on Get_SMSourceField global SMSourceField return SMSourceField end on Set_SMFieldScroll int global SMFieldScroll set SMFieldScroll to int end on Get_SMFieldScroll global SMFieldScroll return SMFieldScroll end on Set_SMNumOflines int global SMNumOflines set SMNumOflines to int end on Get_SMNumOfLines global SMNumOflines return SMNumOflines end on Set_SMConstraintSprite int global SMConstraintSprite set SMConstraintSprite to int end on Get_SMConstraintSprite global SMConstraintSprite return SMConstraintSprite end on Set_SMDisableSprite int global SMDisableSprite set SMDisableSprite to int end on Get_SMDisableSprite global SMDisableSprite return SMDisableSprite end on Set_SMHiliteSprite int global SMHiliteSprite set SMHiliteSprite to int end on Get_SMHiliteSprite global SMHiliteSprite return SMHiliteSprite end on Set_SMSizeOfLine int global SMSizeOfLine set SMSizeOfLine to int end on Get_SMSizeOfLine global SMSizeOfLine return SMSizeOfLine end on Set_SMSelectedLine int global SMSelectedLine set SMSelectedLine to int end on Get_SMSelectedLine global SMSelectedLine return SMSelectedLine end on Get_SelectedLine global SelectedLine return SelectedLine end on Set_SMTopField int global SMTopField set SMTopField to int end on Get_SMTopField global SMTopField return SMTopField end on Set_SMChosenSubMenu int global SMChosenSubMenu set SMChosenSubMenu to int end on Get_SMChosenSubMenu global SMChosenSubMenu return SMChosenSubMenu end